<% form_tag(url_for(:controller => 'centro', :action => 'search')) do %>
  B&uacute;squeda <%= text_field_tag 'search', @search %>
  <%= submit_tag "Buscar" %>
<% end %>

<table>
  <tr>
    <th>Nombre Comercial</th>
    <th>Raz&oacute;n Social</th>
    <th>Nombre Contacto</th>
    <% if perfil_admin? %>
      <th>Status</th>
    <% end %>
  </tr>
  <% for centro in @centros %>
    <tr>
      <td><%=h centro.nombre_comercial %></td>
      <td><%=h centro.razon_social%></td>
      <td><%=h centro.nombre_contacto %></td>
      <% if perfil_admin? %>
        <td><%= Catalogo.valor('Status Items', centro.status_id) %></td>
        <td><%= link_to "Deshabilitar", :action => "deshabilitar", :id => centro %></td>
      <% end %>
      <td><%= link_to "Ver Tripulaci&oacute;n", :controller => "centro/personal", :id => centro, :action => 'list' %></td>
      <td><%= link_to 'Consultar', :action => 'show', :id => centro %></td>
      <td><%= link_to 'Editar', :action => 'edit', :id => centro %></td>
      <td><%= link_to "Cuenta", :action => "estado_cuenta", :id => centro %></td>
    </tr>
  <% end %>
</table>
<p><%= will_paginate @centros %></p>
<p><%=h "Total de Centros: #{@centros_count}" %> |
<%=h "Total de Corporativos: #{@corporativos_count}" %></p>
<P><%= link_to "Exportar a texto", :action => "txt_export" %></P>
<p><%= link_to 'Nuevo Centro', :action => 'new' %></p>
